<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>中期评审表</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
  </head>
  <style>
      @page { margin: 0; }
    body{
      font-size: 18px;
      background: silver;
    }
    .a4-endwise{
      width: 1075px;
      height: 1522.7px;
      /* border: 1px #000 solid; */
      overflow: hidden;
      padding: 0;
      word-break:break-all;
      background: white;
      /* margin: 30px; */
    }
    .print{
      position: fixed;
      top: 1%;
      right: 10%;
    }
    input{
      border-bottom: 1px solid #dbdbdb;
      border-top:0px;
      border-left:0px;
      border-right:0px;
      background-color: #FFFF;
      text-align: center;
    }
    .table_demo tr{ 
        height:60px;
    } 
    .table_demo td {
        padding: 7px;
    }
    .form_demo td{
        width: 100%;
        height: 100px;
    }
    .table_form td{
        /* border:1px solid #ccc;
        border-collapse:collapse; */
        border:none;
        margin-left: 10px;
        padding: 5px;
    }
    .table_form td input{
        border:0;
        background:transparent;
    }
    textarea {
		resize:none;
	}

  </style>
  <body onload="init()">
    <div class="container a4-endwise" id="test">
        <form id="formInfo" text-align="center">
          <h1 style="text-align: center;margin-top: 285px;" id="title"><input type="text" name="title" field="title" disabled style="border: none;"></input> </h1>
            <h2 style="text-align: center;margin-top: 42px;">中期检查评估表</h2>
            <div style="margin-left: 270px;margin-top: 165px;padding: 10px;">
                <label>批准号</label>
                <input type="text" name="pro_no" field="pro_no" disabled>
                <label>计划完成时间</label>
                <input type="text" name="finish_time" field="finish_time" disabled>
            </div>
            <div style="margin-left: 270px;;margin-top: 10px;float: none;padding: 10px;">
                <label>项 目 名 称</label>
                <input type="text" name="title" field="title" disabled>
            </div>
            <div style="float: none;margin-left: 270px;margin-top: 10px;padding: 10px;">
                <label>主 要 负 责 人</label>
                <input type="text" name="name" field="name" disabled>
            </div>
            <div style="float: none;margin-left: 270px;margin-top: 10px;padding: 10px;">
                <label>联 系 电 话(办)</label>
                <input type="text" name="office" field="office" disabled>
                <label>（手机）</label>
                <input type="text" name="phone" field="phone" disabled>
            </div>
            <div style="float: none;margin-left: 270px;margin-top: 10px;padding: 10px;">
                    <label>责 任 单 位</label>
                    <input type="text" name="unit" field="unit" disabled>
            </div>
            <div style="float: none;margin-left: 270px;margin-top: 10px;padding: 10px;">
                <label>通 讯 地 址</label>
                <input type="text" name="postal_address" field="postal_address" disabled>
            </div>
            <div style="display:inline-block;margin-left: 270px;margin-top:10px;padding: 10px;">
                <label>邮 政 编 码</label>
                <input type="text" name="post_code" field="post_code" disabled>
                <label>Email</label>
                <input type="text" name="email" field="email" disabled>
            </div>
            <div style="float: none;margin-left: 270px;margin-top: 10px;padding: 10px;">
                <label>填 表 日 期</label>
                <input type="text" name="filling_date" field="filling_date" disabled>
            </div>
            <div style="margin-left: 490px;margin-top: 140px;padding-top: 200px;">
              <i>湖北省教育厅制</i> 
            </div>
            <div style="margin-left: 450px;margin-top: 10px;">
                <input type="text" name="filling_date" field="filling_date" disabled style="border: none;">
            </div>      
        </form>
    </div>
      <div class="container a4-endwise" style="padding: 20px 70px;">
        <h2 style="text-align:center;">注意事项</h2>
        <div style="margin: 20px;">
           <p>1.请主要负责人带领课题组认真填写各项内容，经所在单位科研、财务管理部门审核盖章后报省教育厅审核汇总，统一报送。个人报送不予受理。</p>
            <p>2.本表一律用计算机填写，电子版请在申报系统中下载，按要求填写、打印。纸质文本请用A3纸双面印制，中缝装订成册。</p>
            <p>3.本表所填研究进展情况、研究成果情况、阶段性成果清单等内容将在网站公布，接受社会监督，请如实填写、认真核校。</p>
            <p>4.无论是否申请滚动资助，本表纸质文本只需报送一份。</p> 
        </div> 
    </div>
    <div class="container a4-endwise" style="padding: 20px 70px;">
        <h2 style="margin: 20px 52px;">一、研究进展情况 </h2>
        <div style="width: 90%;height: 1000px;border: 1px #000 solid;margin: 0 auto;">
            <textarea style="float: left;width: 100%;outline:none;border: none;" id="textbox">
                主要内容：
               1.研究计划总体执行情况及各子课题进展情况；
               2.调查研究及学术交流情况（调研数据整理运用、文献资料收集整理、学术会议、学术交流、国际合作等）；
               3.成果宣传推介情况（成果发布会、《工作简报》报送情况、国家社科基金专刊投稿及采用情况等）
               4.研究中存在的主要问题、改进措施，研究心得、意见建议；5.其他需要说明的问题。
            </textarea>
        </div>
    </div>
    <div class="container a4-endwise" style="padding: 20px 70px;">
         <h2 style="margin: 20px 52px;">二、研究成果情况 </h2>
         <table border="1" align="center" class="table_demo" id="achievementrain" style=" width: 90%;">
            <tr>
                <td>名称</td>
                <td>作者</td>
                <td>成果形式</td>
                <td>刊物名或出版社、时间</td>
                <td>字数</td>
                <td>获奖</td>
            </tr>
         </table>
    </div>
    <div class="container a4-endwise" style="padding: 20px 70px;">
        <h2 style="margin: 20px 52px;">三、下一步研究计划和经费预算 </h2>
        <table border="1" align="center" style="width: 90%;height: 90%;" class="table_form" id="plan_form">
            <tr>
                <td  colspan="4">（一）本项目首次资助经费金额</td>
            </tr>
             <tr>
                <td  colspan="4"><input id="funds" disabled></td>
            </tr>
            <tr>
                <td  colspan="4">（二）已拨付经费开支情况（请如实填写以下细目，同时提交由责任单位财务管理部门出具并盖章的经费开支明细账。）</td>
            </tr>
            <tr>
                <td  colspan="2">1.资料费</td>
                <td  colspan="2"><input type="number" id="book_fee" field="book_fee" disabled></td>
            </tr>
            <tr>
                <td  colspan="2">2.数据采集费</td>
                 <td  colspan="2"><input type="number" name="data_fee" field="data_fee" disabled></td>
            </tr>
            <tr>
                <td  colspan="2">3.差旅费</td>
                 <td  colspan="2"><input type="number" name="travel_fee" field="travel_fee" disabled></td>
            </tr>
             <tr>
                <td  colspan="2">4.会议费</td>
                 <td  colspan="2"><input type="number" name="meeting_fee" field="meeting_fee" disabled></td>
            </tr>
            <tr>
                <td  colspan="2">5.国际合作与交流费</td>
                 <td  colspan="2"><input type="number" name="international_fee" field="international_fee" disabled></td>
            </tr>
            <tr>
                <td  colspan="2">6.设备费</td>
                 <td  colspan="2"><input type="number" name="equipment_fee" field="equipment_fee" disabled></td>
            </tr>
            <tr>
                <td  colspan="2">7.专家咨询费</td>
                 <td  colspan="2"><input type="number" name="consulting_fee" field="consulting_fee" disabled></td>
            </tr>
            <tr>
                <td  colspan="2">8.劳务费</td>
                 <td  colspan="2"><input type="number" name="labour_fee" field="labour_fee" disabled></td>
            </tr>
            <tr>
                <td  colspan="2">9.印刷费</td>
                 <td  colspan="2"><input type="number" name="print_fee" field="print_fee" disabled></td>
            </tr>
             <tr>
                <td  colspan="2">10.管理费</td>
                 <td  colspan="2"><input type="number" name="administration_fee" field="administration_fee" disabled></td>
            </tr>
            <tr>
                <td  colspan="2">11.其他</td>
                <td  colspan="2"><input type="number" name="other_fee" field="other_fee" disabled></td>
            </tr>
            <tr>
                <td>总计：</td>
                <td><input type="number" name="all_fee" field="all_fee" disabled></td>
                <td>结余：</td>
                <td><input type="number" name="surplus" field="surplus" disabled></td>
            </tr>
            <tr>
                <td colspan="4">（三）未支出经费预算（要分项列出开支明细）</td>
            </tr>
            <tr>
                <td>1.资料费</td>
                <td><input type="number" name="book_fee_budget" field="book_fee" disabled></td>
                <td>2.数据采集费</td>
                 <td><input type="number" name="data_fee_budget" field="data_fee" disabled></td>
            </tr>
            <tr>
                 <td>3.差旅费</td>
                 <td><input type="number" name="travel_fee_budget" field="travel_fee" disabled></td>
                 <td>4.会议费</td>
                 <td><input type="number" name="meeting_fee_budget" field="meeting_fee" disabled></td>
            </tr>
            <tr>
                <td>5.国际合作与交流费</td>
                 <td><input type="number" name="international_fee_budget" field="international_fee" disabled></td>
                 <td>6.设备费</td>
                 <td><input type="number" name="equipment_fee_budget" field="equipment_fee" disabled></td>
            </tr>
            <tr>
                <td>7.专家咨询费</td>
                 <td><input type="number" name="consulting_fee_budget" field="consulting_fee" disabled></td>
                 <td>8.劳务费</td>
                 <td><input type="number" name="labour_fee_budget" field="labour_fee" disabled></td>
            </tr>
            <tr>
                <td>9.印刷费</td>
                 <td><input type="number" name="print_fee_budget" field="print_fee" disabled></td>
                 <td>10.管理费</td>
                 <td><input type="number" name="administration_fee_budget" field="administration_fee" disabled></td>
            </tr>
            <tr>
                <td>11.其他</td>
                 <td><input type="number" name="other_fee_budget" field="other_fee" disabled></td>
                 <td>总计：</td>
                 <td><input type="number" name="all_fee_budget" field="all_fee" disabled></td>
            </tr>
             <tr>
                <td colspan="4">（四）下一步研究计划（要列出具体工作方案）</td>
            </tr>
            <tr>
                <td colspan="4">
                    <textarea style="height: 140px;float:left;width: 100%;border: none;outline:none;" id="next_plan">主要内容</textarea>
                </td>
            </tr>
            <tr>
                <td colspan="4">（五）经费缺口情况（研究规模大、周期长、分量重，经费确实存在较大缺口的课题组可填写此项。请根据研究实际需要，科学编制经费开支细目，申请滚动资助。不申请滚动资助的，此项不填。）</td>
            </tr>    
            <tr>
                <td colspan="4">
                    <textarea style="height: 200px;float:left;width: 100%;border: none;outline:none;" id="fund_gap">主要内容</textarea>
                </td>
            </tr>
        </table>    
    </div>
    <div class="container a4-endwise" style="padding: 20px 70px;">
        <h2  style="margin: 20px 52px;">四、审核意见  </h2>
        <table border="1" align="center" style="width: 90%;height: 90%;text-align: left;">
            <tr>
                <td colspan="4" style="text-align: center;"><p style="margin: 10px;">学校主管部门审核意见</p></td>
            </tr>
            <tr>
                <td height="600px">
                    <p style="margin-top: 385px;margin-bottom: 43px;margin-left: 100px;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;公 章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;负责人签字</p>
                    <p style="margin-left: 622px;">年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;月&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日</p>
                </td>
            </tr>
            <tr>
                <td colspan="4" style="text-align: center;"><p style="margin: 10px;">省教育厅意见</p></td>
            </tr>
            <tr>
                <td height="600px">
                    <p style="margin-top: 385px;margin-bottom: 43px;margin-left: 100px;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;公 章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;负责人签字</p>
                    <p style="margin-left: 622px;">年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;月&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日</p>
                </td>
            </tr>
        </table>
    </div>
    <div class="container a4-endwise">
        附件
    </div>
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script>
    function getQueryString(name) {
        var result=window.location.search.match(new RegExp("[\?\&]" + name + "=([^\&]+)", "i"));
        if(result==null || result.length<0)
        {
            return "";
        }
        return result[1];
    } 
function init(){
    var id = getQueryString('item');
    $.ajax({
            type: "POST",
            url: "../../index.php/admin/Report/MidList", //这里写接口地址，

            data: {  
                subproject_id: id //
            }, //调用时的参数
            dataType: "json",//返回json,text,html你自己定
            success: function(data){//成功
                console.log(data.data)
                for(var p in data.data){
                    // console.log(p)
                    if(p == "train"){
                        var field = $("#formInfo [field]");
                        field.each(function() {
                            var value = data.data.train[0][$(this).attr("field")];
                            $(this).val(value);
                        })               
                    }else if(p == "project_mid"){
                        var textbox= $("#textbox").val(data.data.project_mid[0].research_progress);
                        var funds = $("#funds").val(data.data.project_mid[0].funds)
                        var next_plan = $("#next_plan").val(data.data.project_mid[0].next_plan)
                        var fund_gap = $("#fund_gap").val(data.data.project_mid[0].funding_gap)
                        var title = $("#title").val(data.data.project_mid[0].title)
                    }else if(p == "achievementrain"){
                       for(i in  data.data.achievementrain){
                           var item;
                        item = "<tr><td>" +  data.data.achievementrain[i].achievement_name  + "</td>" +"<td>" +
                                data.data.achievementrain[i].achievement_author + "</td>" + "<td>" + 
                                data.data.achievementrain[i].achievement_type + "</td>" + "<td>" +
                                data.data.achievementrain[i].achievement_publish_time + "</td>" + "<td>" +
                                data.data.achievementrain[i].achievement_number + "</td>" + "<td>" + 
                                data.data.achievementrain[i].achievement +"</tr>"  
                                $('#achievementrain').append(item); 
                       }
                               
                    }else{
                        // console.log(data.data.exfund[0])
                        var field = $("#plan_form [field]");
                        field.each(function(){
                            var value = data.data.exfund[0][$(this).attr("field")];
                            $(this).val(value); 
                         })
                    }
                }
                
            }
        })
}
// function preview()
//         {
//             bdhtml=window.document.body.innerHTML;//获取当前页的html代码
//             sprnstr="<!--startprint-->";//设置打印开始区域
//             eprnstr="<!--endprint-->";//设置打印结束区域
//             prnhtml=bdhtml.substring(bdhtml.indexOf(sprnstr)+18); //从开始代码向后取html
//             prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));//从结束代码向前取html
//             window.document.body.innerHTML=prnhtml;
//             window.print();
//             window.document.body.innerHTML=bdhtml;
//         }
    </script>

  </body>
</html>